﻿<!doctype html>
<html>
	<head>
		<title>HTML5 Crcwds</title>
		<script src="Helper.js"></script>
		<script src="Interact.js"></script>
		<script src="Global.js"></script>
		<script src="Draw.js"></script>
		<script src="View.js"></script>
		<script src="Populator/Populator.js"></script>
		<script src="Populator/RandomPopulator.js"></script>
		<script src="Actors/Agent.js"></script>
		<script src="Mover/Mover.js"></script>
		<script src="Mover/StraightMover.js"></script>
		
		<script src="Vector2.js"></script>
		
		<script type="text/javascript">
			
			var t; //Our timer
			var mover;
			var frames = 0;
			
			function main()
			{
				populator = new RandomPopulator(50);
				mover = new StraightMover();
				//draw();
				loop();
			}
			
			function loop()
			{
				t = setTimeout(timer, 33);
			}
			
			function timer()
			{
				mover.Update(1/33);
				draw();
				t = setTimeout(timer, 33);
				frames++;
				document.title = frames;
			}
		
		</script>
	</head>
	<body onload="main()">
		<canvas id="canv" width="800" height="800"
			onmousewheel="mouseWheelCanv(event)"
			onmousedown="mouseDownCanv(event)"
			onmouseup="mouseUpCanv(event)"
			onmousemove="mouseMoveCanv(event)"
		></canvas>
	</body>
</html>